Due to a physical structure, a semiconductor memory such as a NAND flash memory wears and reaches the end of its life at a predetermined number of times of rewriting. In this semiconductor memory, wear leveling needs to be performed to level the degree of wear between blocks in order to increase a storage life thereof. Wear leveling control includes dynamic wear leveling that performs a write/erase on blocks in ascending order of the number of times of rewriting, and static wear leveling that performs data exchange from a block with a high number of times of rewriting to a block with a low number of times of rewriting on which a rewrite is not performed for a long time.